﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.IO;

namespace WindowsFormsApplication2
{
    public partial class Form3 : Form
    {
        private Form1 _form;
        public Form3(Form1 form)
        {
            InitializeComponent();
            _form = form;
            this.StartPosition = FormStartPosition.CenterScreen;
            timer1.Enabled = true;

        }
        private void timer1_Tick(object sender, EventArgs e)//用Timer来控制滚动速度
        {
            label2.Left -= 2;//设置label2左边缘与其容器的工作区左边缘之间的距离
            if (label2.Right < 0)//当label2右边缘与其容器的工作区左边缘之间的距离小于0时
            {
                label2.Left = this.Width;//设置label2左边缘与其容器的工作区左边缘之间的距离为该窗体的宽度
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            _form.transferMenu(comboBox1.Text);
            this.Close();

        }

        private void button2_Click(object sender, EventArgs e)
        {
            _form.transferMenu("不订");
            this.Close();
        }
        
       
    }
}
